<script setup>
    //子组件
    import { inject } from 'vue'

    const web =inject("provideWeb")
    console.log("provideWeb:",web)

    const userAdd =inject("provideFuncUserAdd")
    console.log("userAdd:",userAdd)

</script>

<template>
<h3>依赖与注入子组件</h3>
provideWeb={{web}} <br>
<button @click="userAdd">添加用户</button>
</template>

<style scoped>

</style>